#add delete update change the buy price of each stock
require 'pp'
require 'json'
class StockPrice
	@price_arr
	def initialize(stockprice = Hash.new)
#		@price_arr = Hash.new
		@price_arr = stockprice
	end

	def set(code,price)
		@price_arr[code]=price		
	end
	def delete(code)
		@price_arr.delete(code)
	end	
	def show
		pp @price_arr
	end
	def json
		JSON.generate(@price_arr)
	end
end

